public class Four {
    public static void main(String[] args) {
      int num;
      for (num=10000;num<99999;num++){
          if (num%7!=0||num%11!=0||num%13!=0) {
              continue;
          }
              System.out.println(num);
      }
    }
}
